<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Seamless Cloning</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Seamless Cloning<div class="ingroups"><a class="el" href="../../d1/d0d/group__photo.html">Computational Photography</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gabfc4ba1d1fb873f2b56d34032f86c1d4"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/>
  <a class="el" href="../../df/da0/group__photo__clone.html#ggabfc4ba1d1fb873f2b56d34032f86c1d4a8e6473804ceaa0e8bd0e5828a05235a7">cv::NORMAL_CLONE</a> = 1, 
<br/>
  <a class="el" href="../../df/da0/group__photo__clone.html#ggabfc4ba1d1fb873f2b56d34032f86c1d4a9aeff931a5d5d18b094397f0ca5bb85f">cv::MIXED_CLONE</a> = 2, 
<br/>
  <a class="el" href="../../df/da0/group__photo__clone.html#ggabfc4ba1d1fb873f2b56d34032f86c1d4a8a64bb74d3ef61a73cf755f3a881fe70">cv::MONOCHROME_TRANSFER</a> = 3
<br/>
 }<tr class="memdesc:gabfc4ba1d1fb873f2b56d34032f86c1d4"><td class="mdescLeft"> </td><td class="mdescRight">seamlessClone algorithm flags  <a href="../../df/da0/group__photo__clone.html#gabfc4ba1d1fb873f2b56d34032f86c1d4">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:gabfc4ba1d1fb873f2b56d34032f86c1d4"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga6684f35dc669ff6196a7c340dc73b98e"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/group__photo__clone.html#ga6684f35dc669ff6196a7c340dc73b98e">cv::colorChange</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> mask, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, float red_mul=1.0f, float green_mul=1.0f, float blue_mul=1.0f)</td></tr>
<tr class="memdesc:ga6684f35dc669ff6196a7c340dc73b98e"><td class="mdescLeft"> </td><td class="mdescRight">Given an original color image, two differently colored versions of this image can be mixed seamlessly.  <a href="../../df/da0/group__photo__clone.html#ga6684f35dc669ff6196a7c340dc73b98e">More...</a><br/></td></tr>
<tr class="separator:ga6684f35dc669ff6196a7c340dc73b98e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac5025767cf2febd8029d474278e886c7"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/group__photo__clone.html#gac5025767cf2febd8029d474278e886c7">cv::illuminationChange</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> mask, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, float alpha=0.2f, float beta=0.4f)</td></tr>
<tr class="memdesc:gac5025767cf2febd8029d474278e886c7"><td class="mdescLeft"> </td><td class="mdescRight">Applying an appropriate non-linear transformation to the gradient field inside the selection and then integrating back with a Poisson solver, modifies locally the apparent illumination of an image.  <a href="../../df/da0/group__photo__clone.html#gac5025767cf2febd8029d474278e886c7">More...</a><br/></td></tr>
<tr class="separator:gac5025767cf2febd8029d474278e886c7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2bf426e4c93a6b1f21705513dfeca49d"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/group__photo__clone.html#ga2bf426e4c93a6b1f21705513dfeca49d">cv::seamlessClone</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> dst, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> mask, <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> p, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> blend, int flags)</td></tr>
<tr class="memdesc:ga2bf426e4c93a6b1f21705513dfeca49d"><td class="mdescLeft"> </td><td class="mdescRight">Image editing tasks concern either global changes (color/intensity corrections, filters, deformations) or local changes concerned to a selection. Here we are interested in achieving local changes, ones that are restricted to a region manually selected (ROI), in a seamless and effortless manner. The extent of the changes ranges from slight distortions to complete replacement by novel content <a class="el" href="../../d0/de3/citelist.html#CITEREF_PM03">[193]</a> .  <a href="../../df/da0/group__photo__clone.html#ga2bf426e4c93a6b1f21705513dfeca49d">More...</a><br/></td></tr>
<tr class="separator:ga2bf426e4c93a6b1f21705513dfeca49d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad55df6aa53797365fa7cc23959a54004"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/group__photo__clone.html#gad55df6aa53797365fa7cc23959a54004">cv::textureFlattening</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> mask, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, float low_threshold=30, float high_threshold=45, int kernel_size=3)</td></tr>
<tr class="memdesc:gad55df6aa53797365fa7cc23959a54004"><td class="mdescLeft"> </td><td class="mdescRight">By retaining only the gradients at edge locations, before integrating with the Poisson solver, one washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge Detector is used.  <a href="../../df/da0/group__photo__clone.html#gad55df6aa53797365fa7cc23959a54004">More...</a><br/></td></tr>
<tr class="separator:gad55df6aa53797365fa7cc23959a54004"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Useful links:</p>
<p><a href="https://www.learnopencv.com/seamless-cloning-using-opencv-python-cpp">https://www.learnopencv.com/seamless-cloning-using-opencv-python-cpp</a> </p>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gabfc4ba1d1fb873f2b56d34032f86c1d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabfc4ba1d1fb873f2b56d34032f86c1d4">◆ </a></span>anonymous enum</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>seamlessClone algorithm flags </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggabfc4ba1d1fb873f2b56d34032f86c1d4a8e6473804ceaa0e8bd0e5828a05235a7"></a>NORMAL_CLONE <div class="python_language">Python: cv.NORMAL_CLONE</div></td><td class="fielddoc"><p>The power of the method is fully expressed when inserting objects with complex outlines into a new background </p>
</td></tr>
<tr><td class="fieldname"><a id="ggabfc4ba1d1fb873f2b56d34032f86c1d4a9aeff931a5d5d18b094397f0ca5bb85f"></a>MIXED_CLONE <div class="python_language">Python: cv.MIXED_CLONE</div></td><td class="fielddoc"><p>The classic method, color-based selection and alpha masking might be time consuming and often leaves an undesirable halo. Seamless cloning, even averaged with the original image, is not effective. Mixed seamless cloning based on a loose selection proves effective. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggabfc4ba1d1fb873f2b56d34032f86c1d4a8a64bb74d3ef61a73cf755f3a881fe70"></a>MONOCHROME_TRANSFER <div class="python_language">Python: cv.MONOCHROME_TRANSFER</div></td><td class="fielddoc"><p>Monochrome transfer allows the user to easily replace certain features of one object by alternative features. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga6684f35dc669ff6196a7c340dc73b98e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6684f35dc669ff6196a7c340dc73b98e">◆ </a></span>colorChange()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::colorChange </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>red_mul</em> = <code>1.0f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>green_mul</em> = <code>1.0f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>blue_mul</em> = <code>1.0f</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.colorChange(</td><td class="paramname">src, mask[, dst[, red_mul[, green_mul[, blue_mul]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Given an original color image, two differently colored versions of this image can be mixed seamlessly. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit 3-channel image. </td></tr>
    <tr><td class="paramname">mask</td><td>Input 8-bit 1 or 3-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as src . </td></tr>
    <tr><td class="paramname">red_mul</td><td>R-channel multiply factor. </td></tr>
    <tr><td class="paramname">green_mul</td><td>G-channel multiply factor. </td></tr>
    <tr><td class="paramname">blue_mul</td><td>B-channel multiply factor.</td></tr>
  </table>
  </dd>
</dl>
<p>Multiplication factor is between .5 to 2.5. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../dc/d23/samples_2cpp_2tutorial_code_2photo_2seamless_cloning_2cloning_demo_8cpp-example.html#a12">samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gac5025767cf2febd8029d474278e886c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac5025767cf2febd8029d474278e886c7">◆ </a></span>illuminationChange()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::illuminationChange </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>alpha</em> = <code>0.2f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>beta</em> = <code>0.4f</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.illuminationChange(</td><td class="paramname">src, mask[, dst[, alpha[, beta]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Applying an appropriate non-linear transformation to the gradient field inside the selection and then integrating back with a Poisson solver, modifies locally the apparent illumination of an image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit 3-channel image. </td></tr>
    <tr><td class="paramname">mask</td><td>Input 8-bit 1 or 3-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as src. </td></tr>
    <tr><td class="paramname">alpha</td><td>Value ranges between 0-2. </td></tr>
    <tr><td class="paramname">beta</td><td>Value ranges between 0-2.</td></tr>
  </table>
  </dd>
</dl>
<p>This is useful to highlight under-exposed foreground objects or to reduce specular reflections. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../dc/d23/samples_2cpp_2tutorial_code_2photo_2seamless_cloning_2cloning_demo_8cpp-example.html#a13">samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga2bf426e4c93a6b1f21705513dfeca49d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2bf426e4c93a6b1f21705513dfeca49d">◆ </a></span>seamlessClone()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::seamlessClone </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> </td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>blend</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>blend</td><td>=</td><td>cv.seamlessClone(</td><td class="paramname">src, dst, mask, p, flags[, blend]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Image editing tasks concern either global changes (color/intensity corrections, filters, deformations) or local changes concerned to a selection. Here we are interested in achieving local changes, ones that are restricted to a region manually selected (ROI), in a seamless and effortless manner. The extent of the changes ranges from slight distortions to complete replacement by novel content <a class="el" href="../../d0/de3/citelist.html#CITEREF_PM03">[193]</a> . </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit 3-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Input 8-bit 3-channel image. </td></tr>
    <tr><td class="paramname">mask</td><td>Input 8-bit 1 or 3-channel image. </td></tr>
    <tr><td class="paramname">p</td><td>Point in dst image where object is placed. </td></tr>
    <tr><td class="paramname">blend</td><td>Output image with the same size and type as dst. </td></tr>
    <tr><td class="paramname">flags</td><td>Cloning method that could be <a class="el" href="../../df/da0/group__photo__clone.html#ggabfc4ba1d1fb873f2b56d34032f86c1d4a8e6473804ceaa0e8bd0e5828a05235a7">cv::NORMAL_CLONE</a>, <a class="el" href="../../df/da0/group__photo__clone.html#ggabfc4ba1d1fb873f2b56d34032f86c1d4a9aeff931a5d5d18b094397f0ca5bb85f">cv::MIXED_CLONE</a> or <a class="el" href="../../df/da0/group__photo__clone.html#ggabfc4ba1d1fb873f2b56d34032f86c1d4a8a64bb74d3ef61a73cf755f3a881fe70">cv::MONOCHROME_TRANSFER</a> </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../dc/d23/samples_2cpp_2tutorial_code_2photo_2seamless_cloning_2cloning_demo_8cpp-example.html#a8">samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gad55df6aa53797365fa7cc23959a54004"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad55df6aa53797365fa7cc23959a54004">◆ </a></span>textureFlattening()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::textureFlattening </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>low_threshold</em> = <code>30</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>high_threshold</em> = <code>45</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>kernel_size</em> = <code>3</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.textureFlattening(</td><td class="paramname">src, mask[, dst[, low_threshold[, high_threshold[, kernel_size]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>By retaining only the gradients at edge locations, before integrating with the Poisson solver, one washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge Detector is used. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit 3-channel image. </td></tr>
    <tr><td class="paramname">mask</td><td>Input 8-bit 1 or 3-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as src. </td></tr>
    <tr><td class="paramname">low_threshold</td><td>Range from 0 to 100. </td></tr>
    <tr><td class="paramname">high_threshold</td><td>Value &gt; 100. </td></tr>
    <tr><td class="paramname">kernel_size</td><td>The size of the Sobel kernel to be used.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The algorithm assumes that the color of the source image is close to that of the destination. This assumption means that when the colors don't match, the source image color gets tinted toward the color of the destination image. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../dc/d23/samples_2cpp_2tutorial_code_2photo_2seamless_cloning_2cloning_demo_8cpp-example.html#a14">samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp</a>.</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
